/**
 *
 */

package lohmar.ashar.android.batterySaver.profile;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * @author Mihai HARAS (Lohmar ASHAR) 2011
 */
public class ProfileManager extends BroadcastReceiver {
    public static final String ACTION_PROFILE_STATE = "lohmar.ashar.intent.action.PROFILE_STATE";

    @Override
    public void onReceive(Context context, Intent intent) {
        System.out.println("ProfileManager.onReceive(" + intent.getAction() + ")");
        if (intent.getAction().equals(ACTION_PROFILE_STATE)) {
            ProfileFactory.getDefaultProfile().toggleState();
        }
    }

}
